/**
 * 设计图为750
 * 1rem=75px
 */
function detectOrient () {
  let size = Math.min(document.documentElement.clientWidth, document.documentElement.clientHeight);
  if (320 > size) {
    size = 320
  } else if (size > 750) {
    size = 750
  }
  document.getElementsByTagName('html')[0].style.fontSize = size / 10 + 'px'
}

(function (doc, win) {
  if (doc.addEventListener === undefined) {
    return
  }
  detectOrient()
})(document, window)
